<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button type="button" id="btn">选择</button><br>
    <select id="Select">
        <option>1</option>
        <option>2</option>
        <option>3</option>
        <option>4</option>
        <option>5</option>
    </select>
    <script>
        var btn = document.getElementById("btn");
        var a = document.getElementById("Select");
        var opts = a.getElementsByTagName("option");
        btn.onclick = function () {
            var n = Math.floor(Math.random() * opts.length);
            opts[n].selected = true;
        }
    </script>
</body>
</html>